package es.ats.codington.festival.interfaces.daos;

import java.sql.SQLException;
import java.util.List;

import es.ats.codington.festival.domain.Visitor;

/**
 * The Interface IVisitorDAO.
 */
public interface IVisitorDAO {
	
	/**
	 * Register visitor dao.
	 *
	 * @param con the con
	 * @param visitor the visitor
	 * @return the int
	 * @throws Exception the exception
	 */
	public boolean registerVisitorDAO(Visitor visitor) throws SQLException, ClassNotFoundException;	
	
	/**
	 * Delete visitor dao.
	 *
	 * @param con the con
	 * @param idVisitor the id visitor
	 * @return bool
	 * @throws Exception the exception
	 */
	public boolean deleteVisitorDAO(int idVisitor) throws Exception;	
	
	/**
	 * Update visitor dao.
	 *
	 * @param con the con
	 * @param visitor the visitor
	 * @return the int
	 * @throws Exception the exception
	 */
	public int updateVisitorDAO(Visitor visitor) throws Exception;	
	
	/**
	 * Search visitor dao by id.
	 *
	 * @param con the con
	 * @param idVisitor the id visitor
	 * @return the visitor
	 * @throws Exception the exception
	 */
	public Visitor searchVisitorDAOById(int idVisitor) throws Exception;	
	
	/**
	 * Login dao.
	 *
	 * @param visitor the visitor
	 * @return the visitor
	 * @throws SQLException the SQL exception
	 * @throws ClassNotFoundException the class not found exception
	 */
	public Visitor loginDAO(final Visitor visitor) throws SQLException, ClassNotFoundException;
	
	/**
	 * Update visitor pass dao.
	 *
	 * @param visitor the visitor
	 * @return true, if successful
	 * @throws SQLException the SQL exception
	 * @throws ClassNotFoundException the class not found exception
	 */
	public boolean updateVisitorPassDAO(final Visitor visitor) throws SQLException, ClassNotFoundException;
	
	/**
	 * Search all visitor dao.
	 *
	 * @return the list
	 * @throws SQLException the SQL exception
	 * @throws ClassNotFoundException the class not found exception
	 */
	public List<Visitor> searchAllVisitorDAO(int idAdmin) throws SQLException, ClassNotFoundException;
}